const Koa = require('koa');
const views = require('koa-views');
const path = require('path')


var app = new Koa();

var viewPath = path.join(__dirname, './views')

app.use(views(viewPath, {
  extension: 'ejs'
}))

app.use(async (ctx) => {
  await ctx.render('home', {
    title: 'gp18'
  })
})


app.listen(3000, () => {
  console.log('localhost:3000 start...')
})